package com.xbongbong.saas.enums.business;

import com.xbongbong.i18n.util.I18nMessageUtil;

/**
 * 发票关联类型枚举
 * @author: yuqian
 * @date: 2019/11/13 19:40
 * @desrcption:
 */
public enum RefTypeEnum {
    /**
     * 合同
     */
    CONTRACT(1, "enum.refType.name.contract","contract"),
    /**
     * 应收款
     */
    PAYMENT(2,"enum.refType.name.payment","payment"),
    /**
    回款单
     */
    PAYMENTSHEET(3,"enum.refType.name.paymentsheet","paymentSheet"),
    /**
     * 采购合同
     */
    PURCHASE(4,"purchase","enum.refType.name.purchase"),
    /**
     * 付款计划
     */
    PAYPLAN(5,"payPlan","enum.refType.name.payplan"),
    /**
     * 付款单
     */
    PAYSHEET(1,"paySheet","enum.refType.name.paysheet");

    private Integer code;

    private String name;

    private String alias;

    RefTypeEnum(Integer code, String name, String alias) {
        this.code = code;
        this.name = name;
        this.alias = alias;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }
}
